<?php
if (isset($_POST['select'])) {
    $type = $_POST['select'];
} else {
    $type = "";
}
if ($type == "ArXiv") {
    include("../ArXiv_API/arxiv_api.php");
    print_r(arxiv_get_by_string($_POST['API']));
} else if ($type == "DOI") {
    include("../DOI_API/doi_api.php");
    print_r(doi_get_by_string($_POST['API']));
} else if ($type == "ZMath") {
    include("../ZMath_API/zmath_api.php");
    print_r(zmath_get_by_string($_POST['API']));
}


?>
<form action="API_Test.php" method="post">
	<input type="text" name="API" /> <select name=select>
		<option name=ArXiv value=ArXiv>ArXiv</option>
		<option name=DOI value=DOI>DOI</option>
		<option name=ZMath value=ZMath>ZMath</option>
	</select>
	<p>
		<input type="submit" />
	</p>
</form>
